﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using ezCloud.Data;
using Microsoft.AspNet.Identity;
using ezCloud.Api.Common;

namespace ezCloud.Api.Controllers
{
    [Authorize]
    [RoutePrefix("api/Traveller")]
    public class TravellerController : ezController
    {
        [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
        [Route("GetAll")]
        public List<Travellers> GetAll()
        {
            var user = Common.UserUtitily.getUserProfile();
            
            return context.Travellers.Where(t => t.HotelId == user.HotelId).ToList();
            
        }
    }
}
